package com.hzit.goods.controller;
import com.hzit.common.resp.GoodsInfo;
import com.hzit.common.resp.Resp;
import com.hzit.goods.service.IGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 */
@RestController
@RequestMapping("/goods")
public class GoodsController {

    @Autowired
    private IGoodsService iGoodsService;
    
    @RequestMapping("/queryById/{goodsId}")
    public Resp<GoodsInfo> queryGoods(@PathVariable("goodsId") String goodsId){

        System.out.println("------这是端口4444---------");

        GoodsInfo goodsInfo = iGoodsService.queryByGId(goodsId);

        Resp<GoodsInfo> resp = new Resp<GoodsInfo>();
        resp.setT(goodsInfo);
        return resp;
    }


}
